package 比较接口;
//2.
public class TestDemo {
    public static void main(String[] args) {
        Student student1=new Student("zhangsan",17,96);
        Student student2=new Student("lisi",18,98);
        if(student1.compareTo(student2)>0){
            System.out.println("student1的年龄>student2的年龄");
        }else{
            System.out.println("student1的年龄<student2的年龄");
        }
    }
}
//打印：student1的年龄<student2的年龄
